package edu.zut.cs.software.estateagent.property.service;

import java.util.ArrayList;
import java.util.List;

import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import edu.zut.cs.software.base.service.GenericGenerator;
import edu.zut.cs.software.estateagent.property.domain.Property;
import edu.zut.cs.software.estateagent.property.service.PropertyManager;

public class PropertyEntityGenerator extends GenericGenerator {
	
	List<Property> propertyList;
	
	PropertyManager propertyManager;
	
	@Autowired
	public void setVisitorManager(PropertyManager propertyManager) {
		this.propertyManager = propertyManager;
	}
	
	@Before
	public void setUp() throws Exception {
		this.propertyList = new ArrayList<Property>();
	}
		
		@Test
		public void test() {
			this.propertyManager.save(this.propertyList);
			List<Property> result = this.propertyManager.findAll();
			if (logger.isInfoEnabled()) {
				logger.info("test() - List<Property> result=" + result); //$NON-NLS-1$
			}
		}

}
